package com.pine.app.module.security.oauth.user.authenticator;


import com.pine.app.module.security.oauth.user.IntegrationLoginRequest;
import org.springframework.util.StringUtils;

/** 默认的账号密码认证方式
 * @author xiaoyuan
 * @create 2019/9/3 15:23
 **/
public abstract class UsernamePasswordAuthenticator extends AbstractPreparableIntegrationAuthenticator{

    /**
     * @Description: 如果authType的值为空   那么就是账号和密码的方式认证
     * @Author: xiaoyuan
     * @Date: 2020/3/18 20:44
     */
    @Override
    public boolean support(IntegrationLoginRequest integrationAuthentication) {
        return StringUtils.isEmpty(integrationAuthentication.getAuthType());
    }
}
